<template>
<div>
<el-radio-group v-model="value" v-bind="elProps" @change="change">
      <el-radio @change="change" :label="item.value" size="large" v-for="item in options" :key="item">{{item.label}}</el-radio>
 </el-radio-group>
</div>
</template>

<script setup>
import { ref,watch } from 'vue' 
const props = defineProps({
    elProps:Object,
    modelValue:String,
    options:Array
})
const value = ref(2)
console.log(props.modelValue);

watch(()=>props.modelValue,(newval)=>{
value.value = newval
})
value.value = props.modelValue
const emit = defineEmits(['update:modelValue'])
const change = ()=>{
     emit('update:modelValue',value.value)
}
</script>

<style lang='scss' scoped>

</style>